import { ENUM_DATA_SCOPE } from "@/enum/system.enum";
import { IQuery, TableConfig } from "@/interface/IAxios";
interface GoodsQuery {
  pageNum: number;
  pageSize: number;
  total: number;
  orderByColumn: string;
  isAsc: "desc" | "asc";
  barCode: string;
  keyword: string;
  retailPrice: string;
  category: string;
  scope: ENUM_DATA_SCOPE;
}
export const queryObject: GoodsQuery = {
  pageNum: 1,
  pageSize: 20,
  total: 0,
  orderByColumn: "goods_id",
  isAsc: "desc",
  /* Query bar code conditions */
  barCode: "",
  /* Search the condition of the product name */
  keyword: "",
  // If you need to go through another query, just create a new field here
  // These fields must come from the "./columns" file
  retailPrice: "",
  category: "",
  scope: ENUM_DATA_SCOPE.THIS_SHOP
};
export const query = ref<IQuery<GoodsQuery>>({
  ...queryObject
});
export const selectedKeys = ref<string[]>([]);
export const table = ref<TableConfig<any>>({
  data: [],
  rowKey: "",
  loading: false,
  keys: []
});

export const categoryList = ref([]);
